<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 基础数据设置
 *
 * Date: 20/03/2018
 * @author George
 */
class CreateInfrastructuresTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('infrastructures', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('company_id')->unique()->comment('公司ID');
            $table->integer('fingerprint')->comment('录指纹时间,单位:天');
            $table->integer('contract')->comment('签合同时间,单位:天');
            $table->integer('internship')->comment('实习时间,单位:天');
            $table->integer('absenteeism')->comment('旷工处理时间,单位:分钟');
            $table->integer('earlier')->comment('签到提前时间,单位:分钟');
            $table->integer('late')->comment('签到延后时间,单位:分钟');
            $table->integer('continuous')->comment('连续未考勤,单位:天');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('infrastructures');
    }
}
